package org.xi.behavioral.state.states;

import org.xi.behavioral.state.MusicPlayer;
import org.xi.behavioral.state.api.PlayerState;

public class StoppedState extends PlayerState {
    public StoppedState(MusicPlayer player) {
        super(player);
    }

    @Override
    public void play() {
        System.out.println("Music started playing.");
        player.setState(player.PLAYING_STATE);
    }

    @Override
    public void pause() {
        System.out.println("Cannot pause. Music is not playing.");
    }

    @Override
    public void stop() {
        System.out.println("Music is already stopped.");
    }
}